package com.fr.base;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;

public final class DefaultValues
  implements Serializable, Cloneable
{
  private DateFormat dateFormat = null;
  private DateFormat timeFormat = null;
  private DateFormat dateTimeFormat = null;
  private FRFont frFont = null;

  public DateFormat getDateFormat()
  {
    if (this.dateFormat == null)
      this.dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    return this.dateFormat;
  }

  public void setDateFormat(DateFormat paramDateFormat)
  {
    this.dateFormat = paramDateFormat;
  }

  public DateFormat getTimeFormat()
  {
    if (this.timeFormat == null)
      this.timeFormat = new SimpleDateFormat("HH:mm:ss");
    return this.timeFormat;
  }

  public void setTimeFormat(DateFormat paramDateFormat)
  {
    this.timeFormat = paramDateFormat;
  }

  public DateFormat getDateTimeFormat()
  {
    if (this.dateTimeFormat == null)
      this.dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    return this.dateTimeFormat;
  }

  public void setDateTimeFormat(DateFormat paramDateFormat)
  {
    this.dateTimeFormat = paramDateFormat;
  }

  public FRFont getFRFont()
  {
    if (this.frFont == null)
    {
      Locale localLocale = FRContext.getLocale();
      if (Locale.SIMPLIFIED_CHINESE.equals(localLocale))
        this.frFont = FRFont.getInstance("SimSun", 0, 12);
      else if ((Locale.TRADITIONAL_CHINESE.equals(localLocale)) || (Locale.KOREAN.equals(localLocale)))
        this.frFont = FRFont.getInstance("Dialog", 0, 12);
      else if ((Locale.JAPANESE.equals(localLocale)) || (Locale.JAPAN.equals(localLocale)))
        this.frFont = FRFont.getInstance("MS UI Gothic", 0, 12);
      else
        this.frFont = FRFont.getInstance("Times New Roman", 0, 12);
    }
    try
    {
      return ((FRFont)this.frFont.clone());
    }
    catch (CloneNotSupportedException localCloneNotSupportedException)
    {
    }
    return this.frFont;
  }

  public void setFRFont(FRFont paramFRFont)
  {
    this.frFont = paramFRFont;
  }
}